package com.lipl.base.javaee.netty.nio;

import java.nio.IntBuffer;

/**
 * @Auther: 15541
 * @Date: 2020/10/30 19:14
 * @Description:
 */
public class BasicBuffer {

    public static void main(String[] args) {
        IntBuffer intBuffer = IntBuffer.allocate(5);

        for (int i =0; i<intBuffer.capacity();i++){
            intBuffer.put(i*2);
        }

        intBuffer.flip();

        while (intBuffer.hasRemaining()){
            System.out.println(intBuffer.get());
        }
    }
}

